<!--
 * @Author: wei_jt@ecidi.com
 * @Date: 2019-11-01 15:02:52
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-12-01 15:05:36
 * @Description: 无效路径统一跳转页
 -->
<template>
  <div class="wscn-http404">
    <div class="pic-404">
      <img class="pic-404__parent" :src="img_404" alt="404" />
      <img class="pic-404__child left" :src="img_404_cloud" alt="404" />
      <img class="pic-404__child mid" :src="img_404_cloud" alt="404" />
      <img class="pic-404__child right" :src="img_404_cloud" alt="404" />
    </div>
    <div class="text">
      <div class="tone">
        {{ LANG.TONE }}
      </div>
      <div class="desc">
        {{ LANG.ERROR_404 }}
      </div>
      <div class="tip">
        {{ LANG.DESC_404 }}
      </div>
      <div class="btn">
        <fks-button type="primary" @click="back">
          {{ LANG.GO_BACK }}
        </fks-button>
      </div>
    </div>
  </div>
</template>

<script>
import img_404 from '@/assets/img/error/404.svg'
import img_404_cloud from '@/assets/img/error/404_cloud.png'
export default {
  name: 'Page404',
  data() {
    return {
      img_404,
      img_404_cloud
    }
  },
  methods: {
    back() {
      this.$router.push('/home')
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.wscn-http404 {
  display: flex;
  align-items: center;
  overflow: hidden;

  img {
    width: 100%;
  }

  .pic-404 {
    position: relative;

    &__child {
      position: absolute;

      &.left {
        width: 80px;
        opacity: 0;
        animation-name: cloudLeft;
        animation-duration: 2s;
        animation-timing-function: linear;
        animation-delay: 1s;
        animation-fill-mode: forwards;
      }

      &.mid {
        width: 46px;
        opacity: 0;
        animation-name: cloudMid;
        animation-duration: 2s;
        animation-timing-function: linear;
        animation-delay: 1.2s;
        animation-fill-mode: forwards;
      }

      &.right {
        width: 62px;
        opacity: 0;
        animation-name: cloudRight;
        animation-duration: 2s;
        animation-timing-function: linear;
        animation-delay: 1s;
        animation-fill-mode: forwards;
      }

      @keyframes cloudLeft {
        0% {
          top: 17px;
          left: 220px;
          opacity: 0;
        }

        20% {
          top: 33px;
          left: 188px;
          opacity: 1;
        }

        80% {
          top: 81px;
          left: 92px;
          opacity: 1;
        }

        100% {
          top: 97px;
          left: 60px;
          opacity: 0;
        }
      }

      @keyframes cloudMid {
        0% {
          top: 10px;
          left: 420px;
          opacity: 0;
        }

        20% {
          top: 40px;
          left: 360px;
          opacity: 1;
        }

        70% {
          top: 130px;
          left: 180px;
          opacity: 1;
        }

        100% {
          top: 160px;
          left: 120px;
          opacity: 0;
        }
      }

      @keyframes cloudRight {
        0% {
          top: 100px;
          left: 500px;
          opacity: 0;
        }

        20% {
          top: 120px;
          left: 460px;
          opacity: 1;
        }

        80% {
          top: 180px;
          left: 340px;
          opacity: 1;
        }

        100% {
          top: 200px;
          left: 300px;
          opacity: 0;
        }
      }
    }
  }

  .text {
    min-width: 500px;
    padding-left: 128px;

    .tone {
      margin-bottom: 20px;
      font-weight: bold;
      font-size: 24px;
      line-height: 32px;
      color: #0b4870;
      opacity: 0;
      animation-name: slide-up;
      animation-duration: 1s;
      animation-fill-mode: forwards;
    }

    .desc {
      margin: 16px 0 32px;
      font-size: 24px;
      line-height: 32px;
      color: #191919;
      opacity: 0;
      animation-name: slide-up;
      animation-duration: 1s;
      animation-delay: 0.1s;
      animation-fill-mode: forwards;
    }

    .tip {
      font-size: 16px;
      line-height: 20px;
      color: #555;
      opacity: 0;
      animation-name: slide-up;
      animation-duration: 1s;
      animation-delay: 0.2s;
      animation-fill-mode: forwards;
    }

    .btn {
      display: flex;
      justify-content: flex-end;
      margin-top: 48px;
      opacity: 0;
      animation-name: slide-up;
      animation-duration: 1s;
      animation-delay: 0.3s;
      animation-fill-mode: forwards;

      ::v-deep .fks-button {
        width: 106px;
        height: 40px;
        border-radius: 4px;
        color: #fff;
      }
    }

    @keyframes slide-up {
      0% {
        opacity: 0;
        transform: translateY(100px);
      }

      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }
  }
}
</style>
